package gxb.test09;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class listRandom {
    public static void main(String[] args) {
        Random random = new Random();
        int[] number = new int[10];
        List list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            int a = random.nextInt(100) + 1;
            number[i]=a;
            if (a>=10) list.add(a);
        }
        System.out.print("数组中的所有数字：[");
        for (int num : number) {
            System.out.print(num + " ");
        }
        System.out.print("]");

        System.out.print("\n大于等于10的数字：[");
        for (Object n : list) {
            System.out.print(n + " ");
        }
        System.out.print("]");
    }
}
